﻿@model RTracker.Areas.Recruitment.Models.VacancyStatus.GVacancyStatus

@{
    var IsDisabled = "";
    var DefaultClass = "gd-disabled-cls";
    if (ViewBag.IsDisabled == true && Model.VacancyStatus.VacancyStatusId != 0)
    {
        IsDisabled = "disabled";
    }

}


<form id="frm" class="form-horizontal mnt_form">
    <div class="form-body">
        @Html.HiddenFor(model => model.VacancyStatus.VacancyStatusId)
        @Html.HiddenFor(model => model.VacancyStatus.CreatedBy)
        @Html.HiddenFor(model => model.VacancyStatus.ClientId)

        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">@Html.DisplayNameFor(model => model.VacancyStatus.VacancyStatusName)</label>
                    <div class="col-md-9">
                        <input type="text" @IsDisabled class="form-control @IsDisabled"
                               name="@Html.NameFor(model => model.VacancyStatus.VacancyStatusName)"
                               placeholder="Enter @Html.DisplayNameFor(model => model.VacancyStatus.VacancyStatusName)"
                               value="@(!Model.VacancyStatus.VacancyStatusName.Trim().Equals(string.Empty) ? Model.VacancyStatus.VacancyStatusName : "")">
                    </div>
                </div>
            </div>
            <!--/span-->
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">@Html.DisplayNameFor(model => model.VacancyStatus.VacancyStatusDesc)</label>
                    <div class="col-md-9">
                        <input type="text" @IsDisabled class="form-control @IsDisabled"
                               name="@Html.NameFor(model => model.VacancyStatus.VacancyStatusDesc)"
                               placeholder="Enter @Html.DisplayNameFor(model => model.VacancyStatus.VacancyStatusDesc)"
                               value="@(!Model.VacancyStatus.VacancyStatusDesc.Trim().Equals(string.Empty) ? Model.VacancyStatus.VacancyStatusDesc : "")">
                    </div>
                </div>
            </div>
            <!--/span-->
        </div>
        <!--/row-->
        <!--/span-->
    </div>
    <!--/row-->
    <div class="row">
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-md-3 control-label">@Html.DisplayNameFor(model => model.VacancyStatus.CreatedByName)</label>
                <div class="col-md-9">
                    <input type="text" @IsDisabled placeholder="Enter Text" class="form-control @DefaultClass"
                           name="@Html.NameFor(model => model.VacancyStatus.CreatedByName)"
                           value="@(!Model.VacancyStatus.CreatedByName.Trim().Equals(string.Empty) ? Model.VacancyStatus.CreatedByName : "")" disabled>
                </div>
            </div>
        </div>

        <div class="col-md-6">
            <div class="form-group">
                <label class="col-md-3 control-label">@Html.DisplayNameFor(model => model.VacancyStatus.CreateTimestamp)</label>
                <div class="col-md-9">
                    <input type="text" @IsDisabled placeholder="dd-mm-yyyy" class="form-control @DefaultClass"
                           value="@(!Model.VacancyStatus.CreateTimestamp.ToString().Trim().Equals(string.Empty) ? Model.VacancyStatus.CreateTimestamp.ToString() : "")" disabled>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-6">
            <div class="form-group">
                <label class="col-md-3 control-label">@Html.DisplayNameFor(model => model.VacancyStatus.ModifiedByName)</label>
                <div class="col-md-9">
                    <input type="text" @IsDisabled placeholder="Enter Text" class="form-control @DefaultClass"
                           name="@Html.NameFor(model => model.VacancyStatus.ModifiedByName)"
                           value="@(!Model.VacancyStatus.ModifiedByName.Trim().Equals(string.Empty) ? Model.VacancyStatus.ModifiedByName : "")" disabled>
                </div>
            </div>
        </div>

        <div class="col-md-6">
            <div class="form-group">
                <label class="col-md-3 control-label">@Html.DisplayNameFor(model => model.VacancyStatus.ModifiedTimestamp)</label>
                <div class="col-md-9">
                    <input type="text" @IsDisabled placeholder="dd-mm-yyyy" class="form-control @DefaultClass"
                           value="@(!Model.VacancyStatus.ModifiedTimestamp.ToString().Trim().Equals(string.Empty) ? Model.VacancyStatus.ModifiedTimestamp.ToString() : "")" disabled>
                </div>
            </div>
        </div>
    </div>
    </div>
    <div class="clearfix"></div>
    <div class="form-actions fluid right">
        <div class="col-md-12">
            @if (ViewBag.IsNew == false)
            {
                <img style="float:left" src="~/Content/Images/hardLock_closedx50.png" title="Set Lock" alt="" id="btn-setHardLock-id" value="@Model.VacancyStatus.VacancyStatusId" class="cursor-pointer-cls @(Model.VacancyStatus.IsHardLocked ? "gd-disabled-cls" : "" ) " @ViewBag.StrDisabled />
                <img style="float:left" src="~/Content/Images/hardLock_openx50.png" title="Release Lock" alt="" id="btn-releaseHardLock-id" value="@Model.VacancyStatus.VacancyStatusId" class="cursor-pointer-cls @(!Model.VacancyStatus.IsHardLocked ? "gd-disabled-cls" : "") " @ViewBag.StrDisabled />
            }
            <img src="~/Content/Images/cancel.png" @ViewBag.StrDisabled id="btn-cancel-id" class="cursor-pointer-cls" />
            <img src="~/Content/Images/save.png" @ViewBag.StrDisabled id="btn-Save-id" class="cursor-pointer-cls" />
        </div>
    </div>
</form>
<script type="text/javascript">
    $(".datepicker-cls").each(function () {
        $(this).datepicker({ dateFormat: "dd-mm-yy" });
        //alert($(this).val().replace("-", "/").replace("-", "/").replace("-", "/"));
        $(this).datepicker("setDate", $(this).val());
    })



</script>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

